package com.gd.data.platform.dto;

import java.time.LocalDateTime;
import java.util.List;

import lombok.Data;

/**
 * 离线分析结果DTO
 * 用于离线分析报表展示
 * 
 * @author gd-data-platform
 * @since 1.0.0
 */
@Data
public class OfflineAnalysisResult {

    /**
     * 分析类型
     */
    private String analysisType;

    /**
     * 分析时间范围
     */
    private String timeRange;

    /**
     * 分析结果数据
     */
    private Object resultData;

    /**
     * 生成时间
     */
    private LocalDateTime generateTime;

    /**
     * 资源增长趋势
     */
    private List<ResourceGrowthTrend> resourceGrowthTrends;

    /**
     * 沉睡资源列表
     */
    private List<SleepResource> sleepResources;

    /**
     * 热门资源排行
     */
    private List<PopularResource> popularResources;

    @Data
    public static class ResourceGrowthTrend {
        private String resourceType;
        private String timePeriod;
        private Long growthCount;
        private Double growthRate;
    }

    @Data
    public static class SleepResource {
        private String resourceId;
        private String resourceName;
        private String resourceType;
        private Long callCount;
        private LocalDateTime lastCallTime;
    }

    @Data
    public static class PopularResource {
        private String resourceId;
        private String resourceName;
        private String resourceType;
        private Long callCount;
        private Long downloadCount;
        private Double popularityScore;
    }
}
